<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>05_元素溢出</title>
  <style>
    div {
      width: 800px;
      height: 300px;
      overflow: visible;
      overflow: hidden;
      overflow: scroll;
      overflow: auto;
      background-color: yellow;
    }
    .txt {
      background-color: lime;
      width: 300px;
      /* 注意:以下三句是组合代码 缺一不可!*/
      white-space: nowrap;/* 强制内容不换行 */
      overflow: hidden;/* 溢出隐藏 */
      text-overflow: ellipsis;/* 超出部分省略号显示 */
    }
  </style>
</head>
<body>
<div class="txt">
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid amet architecto consequatur exercitationem illo libero modi placeat quas quasi quis quo quos ratione, reprehenderit sapiente sequi sint soluta tempore voluptate.
</div>
<div>
  <img src="./img/1.png" alt="">
</div>
</body>
</html>
